package uk.ac.aber.Blockmation.Tests;

import static org.junit.Assert.assertTrue;

import java.awt.image.BufferedImage;

import org.junit.Before;
import org.junit.Test;

import uk.ac.aber.Blockmation.MovieModel;
/**
 * @author Aron
 *
 */
public class MovieModelJTest {
	
    private MovieModel model;
    private BufferedImage bim;
	
    @Before
    public void createModelFixture()
    {
        model = new MovieModel();
        bim = new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB);
    }
    
    @Test
    public void testAppendFrame()
    {
    	int frames = 10;
    	for (int i=0; i < frames; i++)
    	{
        	model.appendFrame(bim);
    	}
    	
    	assertTrue( frames == model.size());
    	//assertTrue( model.getIndex() == 9);  // not working after index moved into mainframe
    	System.out.println("Worked");

    }

}
